package com.heima.kaoshi1;

public class Student implements Comparable<Student>{
    private String name;
    private int yuwengr;
    private int shuxuegr;
    private int yinyugr;
    private int core;


    public Student(String nam, int y, int s, int yi) {
    }

    public Student(String name, int yuwengr, int shuxuegr, int yinyugr, int core) {
        this.name = name;
        this.yuwengr = yuwengr;
        this.shuxuegr = shuxuegr;
        this.yinyugr = yinyugr;
        this.core = core;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getYuwengr() {
        return yuwengr;
    }

    public void setYuwengr(int yuwengr) {
        this.yuwengr = yuwengr;
    }

    public int getShuxuegr() {
        return shuxuegr;
    }

    public void setShuxuegr(int shuxuegr) {
        this.shuxuegr = shuxuegr;
    }

    public int getYinyugr() {
        return yinyugr;
    }

    public void setYinyugr(int yinyugr) {
        this.yinyugr = yinyugr;
    }

    public int getCore() {
        return core;
    }

    public void setCore(int core) {
        this.core = core;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", yuwengr=" + yuwengr +
                ", shuxuegr=" + shuxuegr +
                ", yinyugr=" + yinyugr +
                ", core=" + core +
                '}';
    }

    @Override
    public int compareTo(Student o) {
        return o.core-this.core;
    }
}
